﻿<documents created="2010-12-15 11:42:52Z"><document src="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\Mappers\HqstTranslator.cs" renderPrefix="s0"><chunk hits="-1" domain="unknown"><source><![CDATA[using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutomaTones.Model.Automaton_Model;
using Midi;
using Microsoft.Pex.Framework;

namespace AutomaTones.Model.MIDI.Mappers {
    [PexClass]
    partial class HqstTranslator : IMapper
    {
        private readonly List<NoteOut> _notes = new List<NoteOut>();
        [PexMethod]
        public List<NoteOut> Translate(State[,] grid)
        ]]></source>
</chunk>
<method name="Translate" namespace="AutomaTones.Model.MIDI.Mappers" type="AutomaTones.Model.MIDI.Mappers.HqstTranslator" typeName="HqstTranslator" token="6000161" module="AutomaTones.exe"><hits><hit index="0" value="1"/>
<hit index="1" value="1"/>
<hit index="2" value="1"/>
<hit index="3" value="1"/>
<hit index="4" value="1"/>
<hit index="5" value="2"/>
<hit index="6" value="1"/>
<hit index="7" value="1"/>
<hit index="8" value="1"/>
<hit index="9" value="1"/>
<hit index="10" value="1"/>
<hit index="11" value="9"/>
<hit index="12" value="9"/>
<hit index="13" value="9"/>
<hit index="14" value="9"/>
<hit index="15" value="9"/>
<hit index="16" value="9"/>
<hit index="17" value="18"/>
<hit index="18" value="8"/>
<hit index="19" value="3"/>
<hit index="20" value="3"/>
<hit index="21" value="3"/>
<hit index="22" value="3"/>
<hit index="23" value="3"/>
<hit index="24" value="3"/>
<hit index="25" value="6"/>
<hit index="26" value="1"/>
<hit index="27" value="2"/>
<hit index="28" value="2"/>
<hit index="29" value="2"/>
<hit index="30" value="2"/>
<hit index="31" value="2"/>
<hit index="32" value="2"/>
<hit index="33" value="2"/>
<hit index="34" value="4"/>
<hit index="35" value="2"/>
<hit index="36" value="2"/>
<hit index="37" value="2"/>
<hit index="38" value="2"/>
<hit index="39" value="2"/>
<hit index="40" value="2"/>
<hit index="41" value="4"/>
<hit index="42" value="2"/>
<hit index="43" value="2"/>
<hit index="44" value="2"/>
<hit index="46" value="2"/>
<hit index="47" value="2"/>
<hit index="48" value="2"/>
<hit index="49" value="2"/>
<hit index="50" value="4"/>
<hit index="51" value="2"/>
<hit index="52" value="2"/>
<hit index="53" value="2"/>
<hit index="54" value="2"/>
<hit index="55" value="2"/>
<hit index="56" value="2"/>
<hit index="57" value="2"/>
<hit index="58" value="4"/>
<hit index="59" value="2"/>
<hit index="60" value="2"/>
<hit index="61" value="2"/>
<hit index="62" value="2"/>
<hit index="63" value="2"/>
<hit index="64" value="2"/>
<hit index="65" value="4"/>
<hit index="66" value="2"/>
<hit index="67" value="2"/>
<hit index="68" value="2"/>
<hit index="70" value="2"/>
<hit index="71" value="2"/>
<hit index="72" value="2"/>
<hit index="73" value="2"/>
<hit index="74" value="4"/>
<hit index="75" value="1"/>
<hit index="76" value="1"/>
<hit index="77" value="1"/>
<hit index="78" value="1"/>
<hit index="79" value="1"/>
<hit index="80" value="1"/>
<hit index="81" value="1"/>
<hit index="82" value="2"/>
<hit index="83" value="1"/>
<hit index="84" value="1"/>
<hit index="85" value="1"/>
<hit index="86" value="1"/>
<hit index="87" value="1"/>
<hit index="88" value="1"/>
<hit index="89" value="2"/>
<hit index="90" value="1"/>
<hit index="91" value="1"/>
<hit index="92" value="1"/>
<hit index="94" value="1"/>
<hit index="95" value="1"/>
<hit index="96" value="1"/>
<hit index="97" value="1"/>
<hit index="98" value="2"/>
<hit index="99" value="1"/>
<hit index="100" value="1"/>
<hit index="101" value="1"/>
<hit index="102" value="1"/>
<hit index="103" value="1"/>
<hit index="104" value="1"/>
<hit index="105" value="1"/>
<hit index="106" value="2"/>
<hit index="107" value="1"/>
<hit index="108" value="1"/>
<hit index="109" value="1"/>
<hit index="110" value="1"/>
<hit index="111" value="1"/>
<hit index="112" value="1"/>
<hit index="113" value="2"/>
<hit index="114" value="1"/>
<hit index="115" value="1"/>
<hit index="116" value="1"/>
<hit index="118" value="1"/>
<hit index="119" value="1"/>
<hit index="120" value="1"/>
<hit index="121" value="1"/>
<hit index="122" value="2"/>
<hit index="123" value="1"/>
<hit index="124" value="1"/>
<hit index="125" value="1"/>
<hit index="126" value="1"/>
<hit index="127" value="1"/>
<hit index="128" value="1"/>
<hit index="129" value="1"/>
<hit index="130" value="2"/>
<hit index="131" value="1"/>
<hit index="132" value="1"/>
<hit index="133" value="1"/>
<hit index="134" value="1"/>
<hit index="135" value="1"/>
<hit index="136" value="1"/>
<hit index="137" value="2"/>
<hit index="138" value="1"/>
<hit index="139" value="1"/>
<hit index="140" value="1"/>
<hit index="142" value="1"/>
<hit index="143" value="1"/>
<hit index="144" value="1"/>
<hit index="145" value="1"/>
<hit index="146" value="2"/>
<hit index="147" value="1"/>
<hit index="148" value="1"/>
<hit index="149" value="1"/>
<hit index="150" value="1"/>
<hit index="151" value="1"/>
<hit index="152" value="1"/>
<hit index="153" value="1"/>
<hit index="154" value="2"/>
<hit index="155" value="1"/>
<hit index="156" value="1"/>
<hit index="157" value="1"/>
<hit index="158" value="1"/>
<hit index="159" value="1"/>
<hit index="160" value="1"/>
<hit index="161" value="2"/>
<hit index="162" value="1"/>
<hit index="163" value="1"/>
<hit index="164" value="1"/>
<hit index="166" value="1"/>
<hit index="167" value="1"/>
<hit index="168" value="1"/>
<hit index="169" value="1"/>
<hit index="170" value="2"/>
<hit index="171" value="1"/>
<hit index="172" value="1"/>
<hit index="173" value="1"/>
<hit index="174" value="1"/>
<hit index="175" value="1"/>
<hit index="176" value="1"/>
<hit index="177" value="1"/>
<hit index="178" value="2"/>
<hit index="179" value="1"/>
<hit index="180" value="1"/>
<hit index="181" value="1"/>
<hit index="182" value="1"/>
<hit index="183" value="1"/>
<hit index="184" value="1"/>
<hit index="185" value="2"/>
<hit index="186" value="1"/>
<hit index="187" value="1"/>
<hit index="188" value="1"/>
<hit index="190" value="1"/>
<hit index="191" value="1"/>
<hit index="192" value="1"/>
<hit index="193" value="1"/>
<hit index="194" value="2"/>
<hit index="195" value="3"/>
<hit index="196" value="1"/>
<hit index="197" value="1"/>
<hit index="198" value="3"/>
<hit index="199" value="9"/>
<hit index="200" value="9"/>
<hit index="201" value="9"/>
<hit index="202" value="9"/>
<hit index="203" value="9"/>
<hit index="204" value="9"/>
<hit index="205" value="18"/>
<hit index="206" value="8"/>
<hit index="207" value="4"/>
<hit index="208" value="4"/>
<hit index="209" value="4"/>
<hit index="210" value="4"/>
<hit index="211" value="4"/>
<hit index="212" value="4"/>
<hit index="213" value="8"/>
<hit index="214" value="2"/>
<hit index="215" value="3"/>
<hit index="216" value="3"/>
<hit index="217" value="3"/>
<hit index="218" value="3"/>
<hit index="219" value="3"/>
<hit index="220" value="3"/>
<hit index="221" value="3"/>
<hit index="222" value="6"/>
<hit index="223" value="3"/>
<hit index="224" value="3"/>
<hit index="225" value="3"/>
<hit index="226" value="3"/>
<hit index="227" value="3"/>
<hit index="228" value="3"/>
<hit index="229" value="6"/>
<hit index="230" value="3"/>
<hit index="231" value="3"/>
<hit index="232" value="3"/>
<hit index="234" value="3"/>
<hit index="235" value="3"/>
<hit index="236" value="3"/>
<hit index="237" value="3"/>
<hit index="238" value="6"/>
<hit index="239" value="2"/>
<hit index="240" value="2"/>
<hit index="241" value="2"/>
<hit index="242" value="2"/>
<hit index="243" value="2"/>
<hit index="244" value="2"/>
<hit index="245" value="2"/>
<hit index="246" value="4"/>
<hit index="247" value="2"/>
<hit index="248" value="2"/>
<hit index="249" value="2"/>
<hit index="250" value="2"/>
<hit index="251" value="2"/>
<hit index="252" value="2"/>
<hit index="253" value="4"/>
<hit index="254" value="2"/>
<hit index="255" value="2"/>
<hit index="256" value="2"/>
<hit index="258" value="2"/>
<hit index="259" value="2"/>
<hit index="260" value="2"/>
<hit index="261" value="2"/>
<hit index="262" value="4"/>
<hit index="263" value="1"/>
<hit index="264" value="1"/>
<hit index="265" value="1"/>
<hit index="266" value="1"/>
<hit index="267" value="1"/>
<hit index="268" value="1"/>
<hit index="269" value="1"/>
<hit index="270" value="2"/>
<hit index="271" value="1"/>
<hit index="272" value="1"/>
<hit index="273" value="1"/>
<hit index="274" value="1"/>
<hit index="275" value="1"/>
<hit index="276" value="1"/>
<hit index="277" value="2"/>
<hit index="278" value="1"/>
<hit index="279" value="1"/>
<hit index="280" value="1"/>
<hit index="282" value="1"/>
<hit index="283" value="1"/>
<hit index="284" value="1"/>
<hit index="285" value="1"/>
<hit index="286" value="2"/>
<hit index="287" value="1"/>
<hit index="288" value="1"/>
<hit index="289" value="1"/>
<hit index="290" value="1"/>
<hit index="291" value="1"/>
<hit index="292" value="1"/>
<hit index="293" value="1"/>
<hit index="294" value="2"/>
<hit index="295" value="1"/>
<hit index="296" value="1"/>
<hit index="297" value="1"/>
<hit index="298" value="1"/>
<hit index="299" value="1"/>
<hit index="300" value="1"/>
<hit index="301" value="2"/>
<hit index="302" value="1"/>
<hit index="303" value="1"/>
<hit index="304" value="1"/>
<hit index="306" value="1"/>
<hit index="307" value="1"/>
<hit index="308" value="1"/>
<hit index="309" value="1"/>
<hit index="310" value="2"/>
<hit index="311" value="2"/>
<hit index="312" value="2"/>
<hit index="313" value="2"/>
<hit index="314" value="2"/>
<hit index="315" value="2"/>
<hit index="316" value="2"/>
<hit index="317" value="2"/>
<hit index="318" value="4"/>
<hit index="319" value="2"/>
<hit index="320" value="2"/>
<hit index="321" value="2"/>
<hit index="322" value="2"/>
<hit index="323" value="2"/>
<hit index="324" value="2"/>
<hit index="325" value="4"/>
<hit index="326" value="2"/>
<hit index="327" value="2"/>
<hit index="328" value="2"/>
<hit index="330" value="2"/>
<hit index="331" value="2"/>
<hit index="332" value="2"/>
<hit index="333" value="2"/>
<hit index="334" value="4"/>
<hit index="335" value="2"/>
<hit index="336" value="2"/>
<hit index="337" value="2"/>
<hit index="338" value="2"/>
<hit index="339" value="2"/>
<hit index="340" value="2"/>
<hit index="341" value="2"/>
<hit index="342" value="4"/>
<hit index="343" value="2"/>
<hit index="344" value="2"/>
<hit index="345" value="2"/>
<hit index="346" value="2"/>
<hit index="347" value="2"/>
<hit index="348" value="2"/>
<hit index="349" value="4"/>
<hit index="350" value="2"/>
<hit index="351" value="2"/>
<hit index="352" value="2"/>
<hit index="354" value="2"/>
<hit index="355" value="2"/>
<hit index="356" value="2"/>
<hit index="357" value="2"/>
<hit index="358" value="4"/>
<hit index="359" value="1"/>
<hit index="360" value="1"/>
<hit index="361" value="1"/>
<hit index="362" value="1"/>
<hit index="363" value="1"/>
<hit index="364" value="1"/>
<hit index="365" value="1"/>
<hit index="366" value="2"/>
<hit index="367" value="1"/>
<hit index="368" value="1"/>
<hit index="369" value="1"/>
<hit index="370" value="1"/>
<hit index="371" value="1"/>
<hit index="372" value="1"/>
<hit index="373" value="2"/>
<hit index="374" value="1"/>
<hit index="375" value="1"/>
<hit index="376" value="1"/>
<hit index="378" value="1"/>
<hit index="379" value="1"/>
<hit index="380" value="1"/>
<hit index="381" value="1"/>
<hit index="382" value="2"/>
<hit index="383" value="12"/>
<hit index="384" value="3"/>
<hit index="385" value="4"/>
<hit index="386" value="1"/>
<hit index="387" value="1"/>
<hit index="388" value="1"/>
<hit index="389" value="1"/>
<hit index="390" value="3"/>
<hit index="391" value="2"/>
<hit index="392" value="2"/>
<hit index="393" value="1"/>
<hit index="394" value="1"/>
<hit index="395" value="1"/>
<hit index="396" value="1"/>
<hit index="397" value="1"/>
<hit index="398" value="9"/>
<hit index="399" value="3"/>
<hit index="400" value="4"/>
<hit index="401" value="3"/>
<hit index="402" value="2"/>
<hit index="403" value="1"/>
<hit index="404" value="1"/>
<hit index="405" value="2"/>
<hit index="406" value="2"/>
<hit index="407" value="1"/>
<hit index="408" value="9"/>
<hit index="409" value="3"/>
<hit index="410" value="1"/>
<hit index="411" value="1"/>
</hits>
<coverage domain="userortestcode" unit="block" covered="94" total="94" coveredRatio="1"/>
</method>
<chunk hits="1" offset="0000" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="1" offset="0001" domain="userortestcode"><source><![CDATA[_notes.Clear();]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="3" offset="000d" domain="userortestcode"><source><![CDATA[if (grid.GetLength(0) < 3 || grid.GetLength(1) < 3)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                ]]></source>
</chunk>
<chunk hits="1" offset="002b" domain="userortestcode"><source><![CDATA[return _notes;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            for (]]></source>
</chunk>
<chunk hits="1" offset="0037" domain="userortestcode"><source><![CDATA[int i = 0;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="4" offset="0231" domain="userortestcode"><source><![CDATA[i < 3]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[; ]]></source>
</chunk>
<chunk hits="3" offset="022d" domain="userortestcode"><source><![CDATA[i++]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[)
            ]]></source>
</chunk>
<chunk hits="3" offset="003e" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                for (]]></source>
</chunk>
<chunk hits="3" offset="003f" domain="userortestcode"><source><![CDATA[int j = 0;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="39" offset="0221" domain="userortestcode"><source><![CDATA[j < 3]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[; ]]></source>
</chunk>
<chunk hits="36" offset="021d" domain="userortestcode"><source><![CDATA[j++]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[) ]]></source>
</chunk>
<chunk hits="9" offset="0046" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                    ]]></source>
</chunk>
<chunk hits="9" offset="0047" domain="userortestcode"><source><![CDATA[if (grid[i, j].CurrentState == 0)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                        ]]></source>
</chunk>
<chunk hits="8" offset="005e" domain="userortestcode"><source><![CDATA[continue;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                    ]]></source>
</chunk>
<chunk hits="3" offset="0063" domain="userortestcode"><source><![CDATA[switch (grid[i, j].CurrentState)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ {
                        case 1:
                            ]]></source>
</chunk>
<chunk hits="2" offset="009c" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="2" offset="009d" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="6" offset="00ce" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                       case 2:
                            ]]></source>
</chunk>
<chunk hits="2" offset="00d3" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="2" offset="00d4" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 2, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="6" offset="0107" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                      case 3:
                            ]]></source>
</chunk>
<chunk hits="1" offset="010c" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="010d" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 3, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="0140" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                      case 4:
                            ]]></source>
</chunk>
<chunk hits="1" offset="0145" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="0146" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 4, 50,
                                                       grid[i, j].CurrentState % 4));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="0179" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 5:
                            ]]></source>
</chunk>
<chunk hits="1" offset="017e" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="017f" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 4, 50,
                                                       grid[i, j].CurrentState % 5));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="01b2" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                       case 6:
                            ]]></source>
</chunk>
<chunk hits="1" offset="01b4" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="01b5" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 6));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="01e6" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                      case 7:
                            ]]></source>
</chunk>
<chunk hits="1" offset="01e8" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="01e9" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 7));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="021a" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                    }
                ]]></source>
</chunk>
<chunk hits="28" offset="021c" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="3" offset="022c" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[

            for (]]></source>
</chunk>
<chunk hits="1" offset="023c" domain="userortestcode"><source><![CDATA[int i = grid.GetLength(0)-3;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="4" offset="044c" domain="userortestcode"><source><![CDATA[i < grid.GetLength(0)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[; ]]></source>
</chunk>
<chunk hits="3" offset="0448" domain="userortestcode"><source><![CDATA[i++]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[) ]]></source>
</chunk>
<chunk hits="3" offset="024b" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                for (]]></source>
</chunk>
<chunk hits="3" offset="024c" domain="userortestcode"><source><![CDATA[int j = grid.GetLength(1) - 3;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="49" offset="0436" domain="userortestcode"><source><![CDATA[j < grid.GetLength(1)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[; ]]></source>
</chunk>
<chunk hits="46" offset="0432" domain="userortestcode"><source><![CDATA[j++]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[) ]]></source>
</chunk>
<chunk hits="9" offset="025b" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                    ]]></source>
</chunk>
<chunk hits="9" offset="025c" domain="userortestcode"><source><![CDATA[if (grid[i, j].CurrentState == 0)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                        ]]></source>
</chunk>
<chunk hits="8" offset="0273" domain="userortestcode"><source><![CDATA[continue;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                    ]]></source>
</chunk>
<chunk hits="4" offset="0278" domain="userortestcode"><source><![CDATA[switch (grid[i, j].CurrentState)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ {
                        case 1: ]]></source>
</chunk>
<chunk hits="3" offset="02b1" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="02b2" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="9" offset="02e3" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 2: ]]></source>
</chunk>
<chunk hits="2" offset="02e8" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="2" offset="02e9" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 2, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="6" offset="031c" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 3: ]]></source>
</chunk>
<chunk hits="1" offset="0321" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="0322" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 3, 50,
                                                       grid[i, j].CurrentState % 3));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="0355" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 4: ]]></source>
</chunk>
<chunk hits="1" offset="035a" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="035b" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 4, 50,
                                                       grid[i, j].CurrentState % 4));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="038e" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 5: ]]></source>
</chunk>
<chunk hits="2" offset="0393" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="2" offset="0394" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 4, 50,
                                                       grid[i, j].CurrentState % 5));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="6" offset="03c7" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 6: ]]></source>
</chunk>
<chunk hits="2" offset="03c9" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="2" offset="03ca" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 6));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="6" offset="03fb" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                        case 7: ]]></source>
</chunk>
<chunk hits="1" offset="03fd" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="1" offset="03fe" domain="userortestcode"><source><![CDATA[_notes.Add(new NoteOut(Pitch.A3, grid[i, j].CurrentState * 1, 50,
                                                       grid[i, j].CurrentState % 7));]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                                ]]></source>
</chunk>
<chunk hits="3" offset="042f" domain="userortestcode"><source><![CDATA[break;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
                            }
                    }
                ]]></source>
</chunk>
<chunk hits="38" offset="0431" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="3" offset="0447" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="1" offset="045d" domain="userortestcode"><source><![CDATA[return _notes;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
        ]]></source>
</chunk>
<chunk hits="2" offset="0466" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
    }
}
]]></source>
</chunk>
</document>
<document src="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\Automaton Model\State.cs" renderPrefix="s1"><chunk hits="-1" domain="unknown"><source><![CDATA[using System;
using System.Diagnostics.Contracts;

namespace AutomaTones.Model.Automaton_Model {
    /// <author>Anders Øland / anoe@itu.dk</author>
    /// <summary>
    /// The state of a cell represented by a discrete value within a given state space.. 
    /// NOTE: Ideally this would be implemented using generics so states could also be decimals.
    /// NOTE: But due to C#'s lack of type constraint options on value types - this was omitted.
    /// </summary>
    [Serializable]
    public class State {
        /// <summary>
        /// The lower boundary of the state space.
        /// </summary>
        public int SpaceMin { get; protected set; }

        /// <summary>
        /// The upper boundary of the state space.
        /// </summary>
        public int SpaceMax { get; protected set; }

        private int _currentState;

        /// <summary>
        /// Current state.
        /// </summary>
        public int CurrentState {
            get ]]></source>
</chunk>
<method name="get_CurrentState" namespace="AutomaTones.Model.Automaton_Model" type="AutomaTones.Model.Automaton_Model.State" typeName="State" token="60001ce" module="AutomaTones.exe"><hits><hit index="0" value="33"/>
<hit index="1" value="33"/>
</hits>
<coverage domain="userortestcode" unit="block" covered="1" total="1" coveredRatio="1"/>
</method>
<chunk hits="33" offset="0000" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="33" offset="0001" domain="userortestcode"><source><![CDATA[return _currentState;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="33" offset="000a" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            protected internal set {
                Contract.Ensures(CurrentState == value);
                _currentState = value;
            }
        }

        private int _nextState;

        /// <summary>
        /// Next state.
        /// </summary>
        public int NextState {
            get { return _nextState; }
            protected internal set {
                Contract.Ensures(NextState == value);
                _nextState = value;
            }
        }

        /// <summary>
        /// Construct a new State. 
        /// </summary>
        /// <param name="spaceMin"></param>
        /// <param name="spaceMax"></param>
        /// <param name="currentState"></param>
        public State(int spaceMin = 0, int spaceMax = 1, int currentState = 0) {
            SpaceMin = spaceMin;
            SpaceMax = spaceMax;
            _currentState = currentState;
        }

        [ContractInvariantMethod]
        private void ObjInvariant() {
            Contract.Invariant(SpaceMin < SpaceMax);
            Contract.Invariant(SpaceMin <= _currentState && SpaceMax >= _currentState);
            Contract.Invariant(SpaceMin <= _nextState && SpaceMax >= _nextState);
        }
    }
}]]></source>
</chunk>
</document>
<document src="C:\Users\Anders\Documents\automatones\Visual Studio\AutomaTones\AutomaTones\Model\MIDI\NoteOut.cs" renderPrefix="s2"><chunk hits="-1" domain="unknown"><source><![CDATA[using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using Midi;

namespace AutomaTones.Model.MIDI
{
    /// <summary>
    /// NoteOut is a connector used for transporting the data we need for sending MidiOutput with the MidiOut class.
    /// </summary>
    /// <author>Anders Bech Mellson, anbh@itu.dk</author>
    class NoteOut {
        public Pitch Pitch;
        public int Velocity;
        public int Controller;
        public int ControllerValue;

        /// <summary>
        /// Constructs a NoteOut connector.
        /// It can hold both Midi note data and controller data.
        /// However the controller data has default values,
        /// since it's most common to use the notes.
        /// </summary>
        ]]></source>
</chunk>
<method name=".ctor" namespace="AutomaTones.Model.MIDI" type="AutomaTones.Model.MIDI.NoteOut" typeName="NoteOut" token="6000160" module="AutomaTones.exe"><hits><hit index="0" value="5"/>
<hit index="1" value="5"/>
<hit index="2" value="5"/>
<hit index="3" value="5"/>
<hit index="4" value="5"/>
<hit index="5" value="5"/>
<hit index="6" value="5"/>
<hit index="7" value="5"/>
<hit index="8" value="5"/>
<hit index="9" value="5"/>
<hit index="10" value="5"/>
</hits>
<coverage domain="userortestcode" unit="block" covered="2" total="2" coveredRatio="1"/>
</method>
<chunk hits="5" offset="0000" domain="userortestcode"><source><![CDATA[public NoteOut(Pitch pitch, int velocity, int controller=0,int controllerValue=0)]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[ ]]></source>
</chunk>
<chunk hits="5" offset="0007" domain="userortestcode"><source><![CDATA[{]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="5" offset="0008" domain="userortestcode"><source><![CDATA[Pitch = pitch;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="10" offset="000f" domain="userortestcode"><source><![CDATA[Velocity = velocity;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="10" offset="0016" domain="userortestcode"><source><![CDATA[this.Controller = controller;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
            ]]></source>
</chunk>
<chunk hits="10" offset="001d" domain="userortestcode"><source><![CDATA[this.ControllerValue = controllerValue;]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
        ]]></source>
</chunk>
<chunk hits="10" offset="0025" domain="userortestcode"><source><![CDATA[}]]></source>
</chunk>
<chunk hits="-1" domain="unknown"><source><![CDATA[
    }
}
]]></source>
</chunk>
</document>
</documents>
